<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=9" />
<title>CiBackend管理登录</title>
<link rel="shortcut icon" href="/public/admin/images/favicon.ico" type="image/x-icon"> 
<link rel="stylesheet" type="text/css" href="/public/admin/css/login.css" />
</head>
<body>
<div id="logo">
	<img src="/public/admin/images/logo-login.png"> 
</div>
<div id="login">
	<form id="loginform" action="<?=admin_url('passport/check');?>" method="post">
		<input name="vvc_id" type="hidden" value="<?=$vvc_id;?>">
		<input name="vvc_token" type="hidden" value="<?=$vvc_token;?>">
		<p id="info"><?php if(!empty($msg)):?><font color="#ff3300"><?=$msg;?></font><?php else:?>请输入用户名, 密码及验证码<?php endif;?></p>
		<div class="control-group">
			<span class="icon-user" title="用户名"></span><input name="username" placeholder="Username" type="text" autocomplete="off">
		</div>

		<div class="control-group">
			<span class="icon-lock" title="密码"></span><input name="password" placeholder="Password" type="password">
		</div>

		<div class="control-group">
			<span class="icon-cap" title="验证码"></span><input name="vvc_code" style="width:80px;" placeholder="Captcha" autocomplete="off"><img id="captcha_img" src="/vvc?id=<?=$vvc_id;?>&token=<?=$vvc_token;?>" title="看不清？点击更换验证码">
		</div>

		<div class="login-btn">
			<input id="login-btn" value="登 录" type="submit" name="submit">
		</div>
	</form>
</div>
<div id="login-copyright">
	<?=date("Y");?> &copy; CiBackend <a href="http://www.weentech.com" target="_blank">weentech.com</a>
</div>

<script src="/public/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
if(top!=self){
	if(top.location!=self.location) top.location = self.location;
}

$(function(){
	//$("#logo").css("margin-top", ($(window).height()-480)/2+"px");
	$("input[name='username']").focus();

	$("#captcha_img").click(function(){
		$(this).attr("src", '/vvc?id=<?=$vvc_id;?>&token=<?=$vvc_token;?>&' + Math.random());
		$("input[name='vvc_code']").focus();
	});

	$("#loginform").submit(function(e){
		if($.trim($("input[name='username']").val()) == '' || $.trim($("input[name='password']").val()) == '' || $.trim($("input[name='vvc_code']").val()) == ''){
			e.preventDefault();
			$("input[name='username']").focus();
		}
	});
});
</script>

</body>
</html>